
 var dujj = {
        "codeStr": "",
        "pubPass": "BX1o65CoobwcDP33iQW6ld1OyIPsNzF1",
        "pubPassNum": [
            66,
            88,
            49,
            111,
            54,
            53,
            67,
            111,
            111,
            98,
            119,
            99,
            68,
            80,
            51,
            51,
            105,
            81,
            87,
            54,
            108,
            100,
            49,
            79,
            121,
            73,
            80,
            115,
            78,
            122,
            70,
            49
        ],
        "publicKey": ""
    }
function random_(e, t) {
    return void 0 === e && (e = 0),
    void 0 === t && (t = 1e4),
        Math.floor(Math.random() * (t - e) + e)
}

function stringChangeASCIINumberArrs(e) {
    for (var t = [], n = 0; n < e.length; n++)
        t.push(e.charCodeAt(n));
    return t
}

function encryptData(page, pageSize) {
    let post_data = {
    "id": "rtom56c6v8gysvmt",
    "projectKey": "honsan_cloud_ccprec",
    "clientKey": "rtom4ztw4rknp6nj",
    "token": null,
    "clientDailyData": {},
    "acts": [
        {
            "id": "rtom56c6mqouptb3",
            "fullPath": "/ccprec.com.cn.web/client/info/cqweb_nonphy_cqzr",
            "args": [
                page, //页数
                pageSize, //每页条数
                null
            ]
        }
    ]
}
    var t = "";
    try {
        t = JSON.stringify(JSON.stringify(post_data))
    } catch (n) {
        return console.error(n + "这不是一个正确的json对象"),
            ""
    }
    return encryptCode(t)
}

function randomStr(e) {
    for (var t = [], n = 0; n < e; n++)
        t.push(random_(0, 35).toString(36));
    return t.join("")
}

function encryptCode(e) {

    for (var t = encodeURI(e), n = [], i = 0, r = "", o = random_(16, 32), a = randomStr(o), s = stringChangeASCIINumberArrs(a), l = 0, c = 0, u = 0, h = 0; h < t.length; h++)
        i = t.charCodeAt(h),
        l == dujj.pubPassNum.length && (l = 0),
            i += dujj.pubPassNum[l],
            l++,
        c == s.length && (c = 0),
            i += s[c],
            c++,
            u += i,
        u > 65535 && (u -= 65535),
            r = i.toString(36),
            r = ("00" + r).substr(-2, 2),
        1 == r.length && (r = "0" + r),
            n.push(r);
    var d = "";
    return d = u.toString(36),
        d = ("0000" + r).substr(-4, 4),
        n.unshift(a),
        n.unshift(o.toString(36)),
        n.unshift(d),
        n.join("")
}

// console.log(encryptData(JSON.stringify(data)))


function decodeData(e) {
    var t;
    try {
        t = JSON.parse(decryptCode(e))
    } catch (n) {
        return void console.error(n + "json对象转出失败")
    }
    return t
}

function decryptCode(e) {
    var t = ""
        , n = 0
        , i = ""
        , r = []
        , o = []
        , a = 0
        , s = 0;
    t = e.substr(4, 1),
        n = parseInt(t, 36),
        i = e.substr(5, n),
        r = stringChangeASCIINumberArrs(i),
        t = e.substr(5 + n, e.length - 5 - n);
    for (var l = "", c = 0, u = 0, h = 0; h < t.length / 2; h++)
        l = t.substr(u, 2),
            u += 2,
            c = parseInt(l, 36),
        s == r.length && (s = 0),
            c -= r[s],
            s++,
        a == dujj.pubPass.length && (a = 0),
            c -= dujj.pubPassNum[a],
            a++,
            l = String.fromCharCode(c),
            o.push(l);
    return t = o.join(""),
        t = decodeURI(t),
        t
}
console.log(encryptData(1, 10))
// console.log(decryptCode('007wqvx7fsfagsvph42wkiprvy4qfjn657b4q6y635p7h8q7b7e7t794d50647k928g8m6a9n5r7a83926f8j7y6r9i8b585x6p5s7e605r6f7n9h8n918m8a7l7l68736h6r667b7i4a7x9n7x848r8f9b7t796d737g8p767c859j996x7h6z686i5q655u7u8m798i8p7s7k9a8a4p5z6v7z5w5v6e8w7y7m7o5r879d9o7i808k85865m7c926k6x5s5o57626k9i888d9a8l5v6h5l6e6j617t637k828x6t6z7w79616i495k9885857o9e7y7f6k9i88728y8o9f4i5l6f6w537h6j5s6i7v5r5580747i837t7w7b536y5y6z7b6h6k6f6p6g7f69967x5o6c6q4f5i675u7y9f9c91867h6k7u5q7m7r8r5b7e988v536g7y6j6d7h507m8i7c7r7s789l7r3y6e7b7n6t7z7h4q7t7d7d8s7x8d628v8r5u4v9f826f9m859e6m5k7z87749780646b8z948n7b8d888t7c71706p8t7j918s7w849h6m8r97657u6m5x4e6o5y8m7d77897e7l706d566o715s5r7h6v703z7j707d8i9n8d4s7f6r79646462796d704f4r677l7w'))